package

        com.wangc.report.service.impl;

import com.wangc.report.dao.SysUserMapper;
import com.wangc.report.entity.SysUserEntity;
import com.wangc.report.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 系统用户Service实现类
 *
 * @author wangc
 * @email 1620415297@qq.com
 * @date 2020-04-01 23:31:37
 */
@Service("sysUserService")
public class SysUserServiceImpl implements SysUserService {
    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public SysUserEntity queryObject(Long userId) {
        return sysUserMapper.selectByPrimaryKey(userId);
    }

    @Override
    public List<SysUserEntity> queryList(Map<String, Object> map) {
        return sysUserMapper.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return sysUserMapper.queryTotal(map);
    }

    @Override
    public int save(SysUserEntity sysUser) {
        return sysUserMapper.insertSelective(sysUser);
    }

    @Override
    public int update(SysUserEntity sysUser) {
        return sysUserMapper.updateByPrimaryKeySelective(sysUser);
    }

    @Override
    public int delete(Long userId) {
        return sysUserMapper.deleteByPrimaryKey(userId);
    }

    @Override
    public int deleteBatch(Long[] userIds) {
        return sysUserMapper.deleteBatch(userIds);
    }
}
